﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="cn_recruitment_applyingfora_job" Codebehind="applyingfora_job.aspx.cs" %>


<%@ Register Src="../UserControl/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="../UserControl/top_ad.ascx" TagName="top_ad" TagPrefix="uc2" %>
<%@ Register Src="../UserControl/member_menu.ascx" TagName="member_menu" TagPrefix="uc3" %>
<%@ Register Src="../UserControl/footer.ascx" TagName="footer" TagPrefix="uc4" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>职位应聘，<%=(new Gift.WebApp.BasicSet()).TitleBind() %></title>
    <meta name="Keywords" content="<%=(new Gift.WebApp.BasicSet()).KeywordBind() %>%>" />
    <meta name="Description" content="<%=(new Gift.WebApp.BasicSet()).DescriptionBind() %>" />
    <link href="/script/css/public.css" type="text/css" rel="stylesheet" />
    <link href="/script/css/article.css" type="text/css" rel="stylesheet" />
    <link href="/script/css/ie.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" src="/script/js/jquery-1.6.2.min.js"></script>

    <!--登陆注册 弹出窗口-->
    <style type="text/css" media="all">
        @import "/script/js/login/thickbox.css";
    </style>

    <script src="/script/js/login/thickbox.js" type="text/javascript"></script>

    <!-- 头部全部分类 三级导航-->

    <script src="/script/js/allmenu.js" type="text/javascript"></script>
    
     <link href="/script/art_dialog/skins/idialog.css" rel="stylesheet" />

    <script type="text/javascript" src="/script/art_dialog/artDialog.js"></script>

    <script type="text/javascript" src="/script/art_dialog/plugins/iframeTools.source.js"></script>

    <script type="text/javascript" src="/script/js/art_dialog.js"></script>

    <script type="text/javascript">
        $(function () {
            $("#txtName").focus();
            $("#btnApplyingforaJob").click(function () {
                if ($("#txtName").val() == "") {
                    $("#txtName").select();
                    $("#spName").html("<img src=\"/script/images/wrong.gif\" />请输入姓名！");
                    return false;
                } else $("#spName").html("<img src=\"/script/images/right.gif\"/>");
                if ($("#txtAge").val() == "") {
                    $("#txtAge").select();
                    $("#spAge").html("<img src=\"/script/images/wrong.gif\" />请输入年龄！");
                    return false;
                } else $("#spAge").html("<img src=\"/script/images/right.gif\"/>");
                if ($("input[name='sex']:checked").val() == null) {
                    $("input[name='sex']").focus();
                    $("#spSex").html("<img src=\"/script/images/wrong.gif\" />请选择性别！");
                    return false;
                } else $("#spSex").html("<img src=\"/script/images/right.gif\"/>");
                if ($("#txtTelephone").val() == "") {
                    $("#txtTelephone").select();
                    $("#spTelephone").html("<img src=\"/script/images/wrong.gif\" />请输入联系电话！");
                    return false;
                } else {
                    if ($("#txtTelephone").val().match(/^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/) == null) {
                        $("#txtTelephone").select();
                        $("#spTelephone").html("<img src=\"/script/images/wrong.gif\" />电话号码格式不符！如：0754-88888888");
                        return false;
                    } else $("#spTelephone").html("<img src=\"/script/images/right.gif\"/>");
                }
                if ($("#txtEmail").val() == "") {
                    $("#txtEmail").select();
                    $("#spEmail").html("<img src=\"/script/images/wrong.gif\" />请输入电子邮箱！");
                    return false;
                } else {
                    if ($("#txtEmail").val().match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == null) {
                        $("#txtEmail").select();
                        $("#spEmail").html("<img src=\"/script/images/wrong.gif\" />电子邮箱格式不符！");
                        return false;
                    } else $("#spEmail").html("<img src=\"/script/images/right.gif\"/>");
                }
                if ($("#txtaWorkExperience").val().length > 4000) {
                    $("#txtaWorkExperience").select();
                    $("#spWorkExperience").html("<img src=\"/script/images/wrong.gif\" />工作经历不能超过4000个字符！");
                    return false;
                } else $("#spWorkExperience").html("");
                if ($("#txtaRemark").val().length > 4000) {
                    $("#txtaRemark").select();
                    $("#spRemark").html("<img src=\"/script/images/wrong.gif\" />备注不能超过4000个字符！");
                    return false;
                } else $("#spRemark").html("");
                $.ajax({
                    type: "POST",
                    url: "/cn/recruitment/applyingfora_job.ashx",
                    data: "recruitment=" + $("#hdRecruitmentId").val() + "&name=" + escape($("#txtName").val()) + "&age=" + escape($("#txtAge").val()) + "&sex=" + $("input[name='sex']:checked").val() + "&account=" + escape($("#txtAccount").val()) + "&degree=" + escape($("#txtDegree").val()) + "&professiona=" + escape($("#txtProfessiona").val()) + "&telephone=" + $("#txtTelephone").val() + "&email=" + $("#txtEmail").val() + "&workExperience=" + escape($("#txtaWorkExperience").val()) + "&remark=" + escape($("#txtaRemark").val()),
                    success: function (msg) {
                        if (msg == "1") {
                            art.dialog.tips("恭喜您，提交成功！", 1.5);
                            setTimeout("window.location.href='/cn/recruitment/recruitment_list.html'", 2000);
                        } else art.dialog.tips("很抱歉，提交失败！", 1.5);
                    }
                });
                return false;
            });
        });
    </script>

</head>
<body>
    <uc1:header ID="Header1" runat="server" />
    <uc2:top_ad ID="Top_ad1" runat="server" />
    <div class="container news_list job">
        <div class="position">
            您的位置:<span><a href="../index.html">首页</a>>><a href="recruitment_list.html">人才招聘</a>>><strong>应聘职位</strong></span></div>
        <div class="rightcontent">
            <div class="help_content jobcontent">
                <form id="formApplyingforaJob" action="" method="post">
                    <h5>
                        <strong>应聘职位:<%=jobTitle %></strong></h5>
                    <input id="hdRecruitmentId" type="hidden" value="<%=recruitmentId %>" />
                    <table>
                        <tr>
                            <td class="title">
                                <strong>姓名：</strong></td>
                            <td class="content">
                                <input type="text" id="txtName" maxlength="20" />
                                <span id="spName">*</span></td>
                            <td class="title">
                                <strong>年龄：</strong></td>
                            <td class="content">
                                <input type="text" id="txtAge" maxlength="3" onkeypress="if((event.keyCode<48 || event.keyCode>57)&&event.keyCode!=13) event.returnValue=false;" onpaste="return false" style="ime-mode:disabled"  />
                                <span id="spAge">*</span></td>
                        </tr>
                        <tr>
                            <td class="title">
                                <strong>性别：</strong></td>
                            <td class="content">
                                <input name="sex" type="radio" value="1" class="radio" />
                                男
                                <input name="sex" type="radio" value="0" class="radio" />
                                女 <span id="spSex">*</span></td>
                            <td class="title">
                                <strong>户口：</strong></td>
                            <td class="content">
                                <input type="text" id="txtAccount" maxlength="200" /></td>
                        </tr>
                        <tr>
                            <td class="title">
                                <strong>学历：</strong></td>
                            <td class="content">
                                <input type="text" id="txtDegree" maxlength="50" /></td>
                            <td class="title">
                                <strong>专业：</strong></td>
                            <td class="content">
                                <input type="text" id="txtProfessiona" maxlength="20" /></td>
                        </tr>
                        <tr>
                            <td class="title">
                                <strong>联系电话：</strong></td>
                            <td colspan="3">
                                <input type="text" id="txtTelephone" maxlength="50" />
                                <span id="spTelephone">*</span></td>
                        </tr>
                        <tr>
                            <td class="title">
                                <strong>电子邮箱：</strong></td>
                            <td colspan="3">
                                <input type="text" id="txtEmail" maxlength="50" />
                                <span id="spEmail">*</span></td>
                        </tr>
                        <tr>
                            <td class="title">
                                <strong>工作经历：</strong></td>
                            <td colspan="3">
                                <textarea rows="2" cols="2" id="txtaWorkExperience"></textarea><span id="spWorkExperience"></span></td>
                        </tr>
                        <tr>
                            <td class="title">
                                <strong>备注：</strong></td>
                            <td colspan="3">
                                <textarea rows="2" cols="2" id="txtaRemark"></textarea><span id="spRemark"></span></td>
                        </tr>
                    </table>
                    <p class="p_input">
                        <input id="btnApplyingforaJob" type="submit" class="submit" value="提交" /><input type="reset"
                            class="submit" value="重置" /></p>
                </form>
            </div>
        </div>
        <span class="clear"></span>
    </div>
    <uc4:footer ID="Footer1" runat="server" />
</body>
</html>
